<?php
require '../vendor/autoload.php';

$hosts = [
    '101.132.73.77:9200' // ip和端口
];

$client = Elasticsearch\ClientBuilder::create()
                                ->setHosts($hosts)
                                ->build();
$params = [
    'index' => 'one',
    'type' => '_doc',
    'body' => [
        'query' => [
            'bool' => [
                'must' => [
                    [ 'match' => [ 'first_name' => 'abc' ] ],
                    [ 'match' => [ 'age' => '123' ] ],
                ]
            ]
        ]
    ]
];

$results = $client->search($params);
var_dump($results);
